package com.hg.design.behavior.observer.biancheng.ex3;

import java.util.EventObject;

//铃声事件类：用于封装事件源及一些与事件相关的参数
public class RingEvent extends EventObject {
    private static final long serialVersionUID = 5960761302287087511L;

    private boolean sound;//true表示上课铃声,false表示下课铃声

    public RingEvent(Object source, boolean sound){
        super(source);
        this.sound = sound;
    }

    public boolean isSound() {
        return sound;
    }

    public void setSound(boolean sound) {
        this.sound = sound;
    }
}
